/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.neu.nutrons.bots.logomotion;


import edu.neu.nutrons.bots.logomotion.autocmd.*;
import edu.neu.nutrons.bots.logomotion.sim.*;
import edu.neu.nutrons.lib.*;
import edu.wpi.first.wpilibj.*;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class Nutrons2011 extends IterativeRobot {
    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
    Robot bot = new Robot();
    AutoModeController ac = new AutoModeController();
    OperatorController oc = new OperatorController(bot);
    int loops = 0;
    

    public void robotInit() {
        ac.addCommand(new DriveDistanceCommand(24.5,1));
        ac.addCommand(new DriveDistanceCommand(434.1,0));
        ac.addCommand(new TurnToHeadingCommand());
        ac.addCommand(new DriveDistanceCommand(0,.3));
       
    }

    public void disabledPeriodic() {

    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {
        ac.handle();
    }

    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
        oc.handle();

    }
    
}